package com.endurance.controller;

import com.endurance.factory.PayFactory;
import com.endurance.template.AbstractPayCallbackTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: sunlin
 * @Date: 2024-05-09 9:18
 * @Version: 1.0
 * @Description:
 */

@RestController
public class PayController {

    @RequestMapping("/pay")
    public String test(String templateId) {
        AbstractPayCallbackTemplate abstractPayCallbackTemplate = PayFactory.getPayService(templateId);

        return abstractPayCallbackTemplate.asyncCallback();
    }


}
